package com.gollum;

import com.gollum.jpa.annotation.EnableGollumaJpaRepositories;
import com.gollum.jpa.factory.JpaDaoFactoryBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;

/**
 * 程序入口
 *
 * @author Herther
 * @version 1.0.0
 * @createTime 2022年08月22日 21:36:00
 */
//@EnableJpaRepositories(basePackages = {"com.gollum.jpa.dao"},repositoryFactoryBeanClass = JpaDaoFactoryBean.class) // repositoryBaseClass 不加无法使用JpaDao接口作为基类
@SpringBootApplication(scanBasePackages = "com.gollum", exclude = {DataSourceAutoConfiguration.class})  /** 由于需要设置动态数据源这里关闭自动读取 **/
//@EnableJpaRepositories(basePackages = {"com.gollum"},repositoryFactoryBeanClass = JpaDaoFactoryBean.class)
@EnableGollumaJpaRepositories
@EnableSwagger2WebMvc
public class GollumApplication {

    public static void main(String[] args) {
        SpringApplication.run(GollumApplication.class, args);
        System.out.println("欢迎使用 Gollum >>>>> 当前系统信息为：Application version: 1.0.0.SNAPSHOT - Spring Boot version:  (v2.7.0)");
    }

}
